Logarithmic data compression involves the conversion of input values which lie within a predetermined input range to output values which lie within a predetermined output range such that the output range is smaller than the input range. The conversion is accomplished by finding the logarithm of the input value with respect to a predetermined base. Prior art compression systems determine the base by setting the logarithm to the base A of the maximum possible input value equal to the maximum possible output value. EQU Log.sub.A (max input)=max output (1)
Manipulation of equation (1) readily provides the conventional base for a pair of input and output ranges.
Logarithm functions are inherently non-linear. Specifically, the value of the log function rises steeply at low values of the input and the function rises slowly at the high end of the input range. Since the output of the conventional log compression is simply the value of the log function, the output data will have a non-linear distribution over the output range. At the low end of the input range an increment of one in the input value may result in an increment of two or three in the output value. This means that some available output values are not used. Furthermore, at the upper end of the input range, an increment of one in the input value may correspond to an increment of zero in the output value. So the non-linearity of the log function results in increased ambiguity when the data is re-expanded.
A further inaccuracy inherent in the log function involves an input value of zero. The value of any log function for an input of zero is minus infinity. This is not within the available output range, so either inputs of zero must be prevented or a special output value must be assigned for an input of zero. Conventionally, an output of zero is assigned, which is also the output for an input of one, so an additional ambiquity is introduced.
Log data compression is often accomplished using look-up tables contained in read-only memory (ROM). The digital input value corresponds to an address in the look-up table. The digital word stored at that address is the output value which was calculated using the logarithm function. This is the well known method for implementing non-linear functions. A fundamental limitation on this method arises from the limits of the particular ROM device chosen. For instance, a 1K ROM has 1,024 memory locations and is addressable by a ten-bit word. If such a device is used in a compression having a twelve-bit input range, then four ROMs and some decoding logic will be required to perform the data compression. Of course, it is also possible to use ROMs big enough to be addressed by the desired input word. But at some point there will always be data words too large for the largest available ROMs.